// main.ts
import './assets/main.scss'
import { createApp } from 'vue'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'

import router from '@/router'  //默认找到index.js文件
import { createPinia } from 'pinia'
import { createPersistedState } from 'pinia-persistedstate-plugin'
import locale from 'element-plus/dist/locale/zh-cn.js'
import BaiduMap from 'vue-baidu-map-3x'


const pinia = createPinia();
const persist = createPersistedState();
const app = createApp(App)
app.use(BaiduMap, {
  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  ak: 'yI4yj5Qb2lUCq4N6Tb1S6jZBcNRGcleI',
  // v:'2.0',  // 默认使用3.0
  // type: 'WebGL' // ||API 默认API  (使用此模式 BMap=BMapGL)
});


pinia.use(persist)
app.use(router)
app.use(pinia)
app.use(ElementPlus, { locale })
app.mount('#app')